#ifndef ECGPROCESS_H
#define ECGPROCESS_H

#include <QWidget>
#include "charts/WaveformChart.h"
#include "dll/ecgrwaveextract.h"
namespace Ui {
class ECGProcess;
}

class ECGProcess : public QWidget
{
    Q_OBJECT

public:
    explicit ECGProcess(QWidget *parent = nullptr);
    ~ECGProcess();

private slots:
    void on_pushButton_selectFile_clicked();

    void on_comboBox_filter1_currentIndexChanged(int index);

    void on_comboBox_filter2_currentIndexChanged(int index);
    void mousePressEvent(QMouseEvent *event);
    void on_pushButton_selectFile_2_clicked();

    void on_pushButton_close_clicked();


    void on_pushButton_R_feats_clicked();

private:
    Ui::ECGProcess *ui;
    // WaveformChart *chart_rawecg,*chart_filterecg;
    QVector<double>rawecgWaves,filterecgWaves1,filterecgWaves2,filterecgWaves3;
    QVector<double>ecgWaves_x;
    double yAxisminv=1000;
    double yAxismaxv=-1000;
    void initWave();
    void initControls();
    void initMulti_USBDongle();
    QByteArray Hexstring2QByteArray(QString str);
    QString CharArrayToHexString(QByteArray Buffer, int Len);

    ECGRWaveExtract *ecgRExtract;
};

#endif // ECGPROCESS_H
